﻿<%@ Page Title="admin_works" Language="C#" MasterPageFile="~/main/masterpage/main.Master"
    AutoEventWireup="true" CodeBehind="dashboard.aspx.cs" Inherits="nkstdgia.main.dashboard" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc2" %>
<%@ Register Assembly="wsRK.wsControls" Namespace="wsRK.wsControls" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="phd_content" runat="server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <div class="webapplication_form_header">
                <div class="left">
                    <h1>
                        <asp:Label ID="lblTitle" runat="server">Bảng khảo sát mới của bạn</asp:Label>
                    </h1>
                </div>
            </div>
            <cc1:wsLstListView ID="lvDSKhaoSat" runat="server" OnbtnFirst_Click="_lv_btnFirst_Click"
                OnbtnLast_Click="_lv_btnLast_Click" OnbtnNext_Click="_lv_btnNext_Click" OnbtnPrev_Click="_lv_btnPrev_Click"
                OnddlPageSize_SelectedIndexChanged="_lv_ddlPageSize_SelectedIndexChanged" OnddlPageIndex_SelectedIndexChanged="_lv_ddlPageIndex_SelectedIndexChanged"
                OnItemDataBound="lvDSKhaoSat_ItemDataBound">
                <LayoutTemplate>
                    <table class="data_table">
                        <tr>
                            <th style="width: 40px">
                                #
                            </th>
                            <th class="width100">
                                <asp:LinkButton ID="LinkButton5" runat="server" OnClick="sortbyPhieuso_click">Ph. số</asp:LinkButton>
                            </th>
                            <th>
                                Địa chỉ khảo sát
                            </th>
                            <th class="width100">
                                <asp:LinkButton ID="LinkButton1" runat="server" OnClientClick="javascript:Dialog.showLoader();"
                                    OnClick="sortbyGiaGiaoDich_click">Giá giao dịch</asp:LinkButton>
                            </th>
                            <th id="thG1" runat="server" class="width100">
                                <asp:LinkButton ID="LinkButton2" runat="server" OnClientClick="javascript:Dialog.showLoader();"
                                    OnClick="sortbyGia1_click">Giá TB 1</asp:LinkButton>
                            </th>
                            <th id="thG2" runat="server" class="width100">
                                <asp:LinkButton ID="LinkButton3" runat="server" OnClientClick="javascript:Dialog.showLoader();"
                                    OnClick="sortbyGia2_click">Giá TB 2</asp:LinkButton>
                            </th>
                            <th class="width50">
                                <asp:LinkButton ID="LinkButton4" runat="server" OnClientClick="javascript:Dialog.showLoader();"
                                    OnClick="sortbyStatus_click">Tr. thái</asp:LinkButton>
                            </th>
                            <th class="width50">
                            </th>
                        </tr>
                        <tr id="itemPlaceholder" runat="server">
                        </tr>
                    </table>
                </LayoutTemplate>
                <ItemTemplate>
                    <tr>
                        <td>
                            <%# Eval("RowNumber") %>
                        </td>
                        <td>
                            <%# Eval("SO_PHIEU") %>
                        </td>
                        <td style="text-align: left">
                            <asp:Image ID="imgMajor" runat="server" ImageUrl='<%# Eval("SO_PHIEU") %>' />
                            <asp:HyperLink ID="lkPhieuKhaoSat" runat="server" Target="_blank" Text='<%# Eval("DIA_CHI") %>'
                                NavigateUrl='<%# "bangkhaosat/ctbangkhaosat.aspx?phieuID=" + Eval("MA_HO_SO") %>'></asp:HyperLink>
                            <br />
                            <label>
                                <%# Eval("DUONG").ToString() + ", " + Eval("DOAN_DUONG").ToString() + ", " + Eval("TEN_PHUONG").ToString() + ", " + Eval("TEN_QUAN").ToString() %></label>
                            <asp:Panel ID="Panel1" runat="server" CssClass="tooltip" Width="350px">
                                <table style="width: 100%">
                                    <tr>
                                        <td style="width: 110px">
                                            <span style="font-weight: bold">Chủ sử dụng : </span>
                                        </td>
                                        <td style="text-align: left">
                                            <asp:Label ID="TitleLabel" runat="server" Font-Bold="True" Font-Names="Verdana" Font-Size="8pt"
                                                ForeColor="#006600" Text='<%# Eval("TEN_CHU_SU_DUNG") %>'></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="text-align: left">
                                            <span style="font-weight: bold">Ngày khảo sát : </span>
                                        </td>
                                        <td>
                                            <%# DateTime.Parse(Eval("NGAY_KHOI_TAO").ToString()).ToShortDateString() %>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="text-align: left">
                                            <span style="font-weight: bold">Người cập nhật : </span>
                                        </td>
                                        <td>
                                            <%# Eval("UserName") %>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="text-align: left">
                                            <span style="font-weight: bold">Ngày cập nhật : </span>
                                        </td>
                                        <td>
                                            <%# Eval("NGAY_CAP_NHAT") %>
                                        </td>
                                    </tr>
                                </table>
                            </asp:Panel>
                            <cc2:HoverMenuExtender ID="HoverMenuExtender1" runat="server" PopupControlID="Panel1"
                                TargetControlID="lkPhieuKhaoSat" PopupPosition="right">
                            </cc2:HoverMenuExtender>
                        </td>
                        <td style="text-align: right">
                            <%# Eval("GIA_GIAO_DICH_TRIEU_DONG").ToString() == "0" ? "" : string.Format("{0:###,###,##0.000}", double.Parse(Eval("GIA_GIAO_DICH_TRIEU_DONG").ToString()))%>
                        </td>
                        <td id="td1GD1" runat="server" style="text-align: right">
                            <%# double.Parse(Eval("GIA_DAT_1").ToString()) <= 0 ? "N/A": string.Format("{0:###,###,##0.000}", double.Parse(Eval("GIA_DAT_1").ToString())) %>
                        </td>
                        <td id="td1GD2" runat="server" style="text-align: right">
                            <%# double.Parse(Eval("GIA_DAT_2").ToString()) <= 0 ? "N/A": string.Format("{0:###,###,##0.000}", double.Parse(Eval("GIA_DAT_2").ToString())) %>
                        </td>
                        <td>
                            <asp:Image ID="imgStatus" runat="server" ImageUrl='<%# Eval("ACTIVE_FLAG").ToString()=="Y"?"~/images/ready.png":"~/images/notyet.png" %>'
                                AlternateText='<%# Eval("ACTIVE_FLAG").ToString()=="Y"?"Hoàn thành":"Chưa xong" %>' />
                        </td>
                        <td>
                            <asp:HyperLink ID="lbtnExport" runat="server" ImageUrl="~/images/iconExcel.gif" Width="16px"
                                Height="16px" NavigateUrl='<%# "~/FileDownload.ashx?type=exportptd&id=" + Eval("MA_HO_SO").ToString() %>'
                                Visible='<%# Eval("ACTIVE_FLAG").ToString()=="Y"?true:false %>'></asp:HyperLink>
                        </td>
                    </tr>
                </ItemTemplate>
                <AlternatingItemTemplate>
                    <tr class="altrow">
                        <td>
                            <%# Eval("RowNumber") %>
                        </td>
                        <td>
                            <%# Eval("SO_PHIEU") %>
                        </td>
                        <td style="text-align: left">
                            <asp:Image ID="imgMajor" runat="server" ImageUrl='<%# Eval("SO_PHIEU") %>' />
                            <asp:HyperLink ID="lkPhieuKhaoSat" runat="server" Target="_blank" Text='<%# Eval("DIA_CHI") %>'
                                NavigateUrl='<%# "bangkhaosat/ctbangkhaosat.aspx?phieuID=" + Eval("MA_HO_SO") %>'></asp:HyperLink>
                            <br />
                            <label>
                                <%# Eval("DUONG").ToString() + ", " + Eval("DOAN_DUONG").ToString() + ", " + Eval("TEN_PHUONG").ToString() + ", " + Eval("TEN_QUAN").ToString() %></label>
                            <asp:Panel ID="Panel1" runat="server" CssClass="tooltip" Width="350px">
                                <table style="width: 100%">
                                    <tr>
                                        <td style="width: 110px">
                                            <span style="font-weight: bold">Chủ sử dụng : </span>
                                        </td>
                                        <td style="text-align: left">
                                            <asp:Label ID="TitleLabel" runat="server" Font-Bold="True" Font-Names="Verdana" Font-Size="8pt"
                                                ForeColor="#006600" Text='<%# Eval("TEN_CHU_SU_DUNG") %>'></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="text-align: left">
                                            <span style="font-weight: bold">Ngày khảo sát : </span>
                                        </td>
                                        <td>
                                            <%# DateTime.Parse(Eval("NGAY_KHOI_TAO").ToString()).ToShortDateString() %>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="text-align: left">
                                            <span style="font-weight: bold">Người cập nhật : </span>
                                        </td>
                                        <td>
                                            <%# Eval("UserName") %>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="text-align: left">
                                            <span style="font-weight: bold">Ngày cập nhật : </span>
                                        </td>
                                        <td>
                                            <%# Eval("NGAY_CAP_NHAT") %>
                                        </td>
                                    </tr>
                                </table>
                            </asp:Panel>
                            <cc2:HoverMenuExtender ID="HoverMenuExtender1" runat="server" PopupControlID="Panel1"
                                TargetControlID="lkPhieuKhaoSat" PopupPosition="right">
                            </cc2:HoverMenuExtender>
                        </td>
                        <td style="text-align: right">
                            <%# Eval("GIA_GIAO_DICH_TRIEU_DONG").ToString() == "0" ? "" : string.Format("{0:###,###,##0.000}", double.Parse(Eval("GIA_GIAO_DICH_TRIEU_DONG").ToString()))%>
                        </td>
                        <td id="td2GD1" runat="server" style="text-align: right">
                            <%# double.Parse(Eval("GIA_DAT_1").ToString()) <= 0 ? "N/A": string.Format("{0:###,###,##0.000}", double.Parse(Eval("GIA_DAT_1").ToString())) %>
                        </td>
                        <td id="td2GD2" runat="server" style="text-align: right">
                            <%# double.Parse(Eval("GIA_DAT_2").ToString()) <= 0 ? "N/A": string.Format("{0:###,###,##0.000}", double.Parse(Eval("GIA_DAT_2").ToString())) %>
                        </td>
                        <td>
                            <asp:Image ID="imgStatus" runat="server" ImageUrl='<%# Eval("ACTIVE_FLAG").ToString()=="Y"?"~/images/ready.png":"~/images/notyet.png" %>'
                                AlternateText='<%# Eval("ACTIVE_FLAG").ToString()=="Y"?"Hoàn thành":"Chưa xong" %>' />
                        </td>
                        <td>
                            <asp:HyperLink ID="lbtnExport" runat="server" ImageUrl="~/images/iconExcel.gif" Width="16px"
                                Height="16px" NavigateUrl='<%# "~/FileDownload.ashx?type=exportptd&id=" + Eval("MA_HO_SO").ToString() %>'
                                Visible='<%# Eval("ACTIVE_FLAG").ToString()=="Y"?true:false %>'></asp:HyperLink>
                        </td>
                    </tr>
                </AlternatingItemTemplate>
                <EmptyDataTemplate>
                    <table class="data_table">
                        <tr>
                            <th style="width: 40px">
                                #
                            </th>
                            <th class="width100">
                                Ph. số
                            </th>
                            <th>
                                Địa chỉ khảo sát
                            </th>
                            <th class="width100">
                                Giá giao dịch
                            </th>
                            <th id="td3GD1" runat="server" class="width100">
                                Giá TB 1
                            </th>
                            <th id="td3GD2" runat="server" class="width100">
                                Giá TB 2
                            </th>
                            <th class="width50">
                                Tr. thái
                            </th>
                            <th class="width50">
                            </th>
                        </tr>
                        <tr>
                            <td colspan="9">
                                <label runat="server">
                                    <%= base.getValueFromLocale("NoData")%></label>
                            </td>
                        </tr>
                    </table>
                </EmptyDataTemplate>
            </cc1:wsLstListView>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="phd_footer" runat="server">
</asp:Content>
